/*
 * DirectSocket.java
 *
 * Created on 23 ������ 2007 �., 19:11
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package protocol.net;

import jimm.*;

public class DirectSocket {
    private TcpSocket socket = new TcpSocket();
    
    public void connectTo(String url) throws JimmException {
        socket.connectTo(url);
    }
    public final int read() throws JimmException {
        return socket.read();
    }
    
    public final int readFully(byte[] data) throws JimmException {
        return socket.readFully(data);
    }
    public final void write(byte[] data) throws JimmException {
        socket.write(data);
        socket.flush();
    }
    public final int available() throws JimmException {
        return socket.available();
    }

    // Sets the reconnect flag and closes the connection
    public final void close() {
        socket.close();
    }
}
